package com.coder.utils.result;

public class Res {
    private static final String SUCCESS = "success";
    private static final String ERROR = "error";

    public static Result ok(){
        return ok(SUCCESS, null);
    }

    public static Result ok(String message){
        return ok(message, null);
    }

    public static Result ok(Object data){
        return ok(SUCCESS, data);
    }

    public static Result ok(String message, Object data){
        return new Result(true, message, data);
    }


    public static Result error(){
        return error(ERROR);
    }

    public static Result error(String message){
        return new Result(false, message, null);
    }
}
